<% content_for(:title, Spree.t(:forgot_password)) %>

<h1 class="mb-3 font-weight-light"><%= Spree.t(:change_password) %></h1>
<%= form_for(resource, as: resource_name, url: password_path(:admin_user), html: { method: :put }, data: { turbo_frame: :_top, turbo: false }) do |f| %>
  <%= render partial: 'spree/admin/shared/error_messages', locals: { target: resource } %>
  <%= f.hidden_field :reset_password_token %>
  <div class="form-group mb-3">
    <%= f.label :password, Spree.t(:password), required: true, class: 'form-label' %>
    <% if @minimum_password_length %>
      <em>(<%= @minimum_password_length %> characters minimum)</em>
    <% end %>
    <%= f.password_field :password, autofocus: true, autocomplete: "new-password", class: 'form-control form-control-lg rounded-sm', min: @minimum_password_length %>
  </div>
  <div class="form-group mb-3">
    <%= f.label :password_confirmation, Spree.t(:confirm_password), required: true, class: 'form-label' %>
    <%= f.password_field :password_confirmation, autocomplete: "new-password", class: 'form-control form-control-lg rounded-sm', min: @minimum_password_length %>
  </div>
  <%= render 'spree/admin/shared/devise/links', f: f %>
  <%= turbo_save_button_tag Spree.t(:reset_password), class: 'btn btn-primary btn-lg w-100' %>
<% end %>

